/*
 * TCSS 422 Web Spider Project
 * Group Money: Al McKenzie, Michael Pitts, Taylor Zielske
 */
/**
 *
 */
package test;

import java.util.Observable;
import java.util.Observer;

/**
 * This class allows a user to input a test Observer and see the results of calls
 * to the update() method.
 * @author Michael Pitts
 * @version Oct 26, 2011
 */
public class MyObserver implements Observer {
	
	/**
	 * Stores the last object passed via update().
	 */
	private Object my_object;
	
	/**
	 * Creates a new MyObserver.
	 */
	public MyObserver() {
		my_object = null;
	}

	/**
	 * @see java.util.Observer#update(java.util.Observable, java.lang.Object)
	 */
	@Override public void update(Observable the_o, Object the_arg) {
		my_object = the_arg;
	}
	
	/**
	 * Gets the last object passed to MyObserver.
	 * @return the last object passed to this Observer.
	 */
	public Object getUpdate() {
		return my_object;
	}

}
